package Test;

import javax.swing.text.html.HTMLDocument;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;

public class T1 {
    public static void main(String[] args) {

    }

    public static void main3(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int numRows= scanner.nextInt();
        List<List<Integer>>list=new ArrayList<>();
        List<Integer>list0=new ArrayList<>();
        list0.add(1);
        list.add(list0);
        for (int i = 1; i <numRows ; i++) {
            List<Integer>list1=new ArrayList<>();
            list1.add(1);
            for (int j = 1; j <i ; j++) {
              list1.add(list.get(i-1).get(j-1)+list.get(i-1).get(j));
            }
            list1.add(1);
            list.add(list1);
        }
        System.out.println(list);
    }


    public static void main2(String[] args) {
        ArrayList<Character>list=new ArrayList<>();
       String s1="welcome to bit";
       String s2="come";
        for (int i = 0; i <s1.length() ; i++) {
            if((!(s2.contains(s1.charAt(i)+"")))){
            list.add(s1.charAt(i));
            }
        }
        System.out.println(list);
        for (int i = 0; i < list.size() ; i++) {
            System.out.print(list.get(i)+" ");
        }

    }
    public static void main1(String[] args) {
        ArrayList<Integer>list=new ArrayList<>();
        list.add(10);
        list.add(20);
        list.add(30);
        list.add(40);
        list.add(40);
        list.add(50);
        System.out.println(list);
        list.add(2,100);
        System.out.println(list);
        list.add(6,20);
        System.out.println(list);
        System.out.println(list.get(4));
list.set(0,121212);
        System.out.println(list);
int x=list.indexOf(40);
        System.out.println(x);
        int x1= list.lastIndexOf(40);
        System.out.println(x1);
        System.out.println(list.size());
        System.out.println("+++++++++++++++++");
        List<Integer> list2=list.subList(2,4);
        System.out.println(list2);
        System.out.println("========================");
        System.out.println(list);
        list.remove(2);
        System.out.println(list);
        System.out.println("============================");
        for (int value:list) {
            System.out.print(value+" ");
        }
        System.out.println("=============================");
        Iterator it=list.listIterator();
while (it.hasNext()){
    Object value=it.next();
    System.out.print(value+" ");
}
        System.out.println();
        System.out.println("=================================");
        Iterator iterator=list.listIterator(3);
        while (iterator.hasNext()){
            Object value=iterator.next();
            System.out.print(value+" ");
        }
        System.out.println("================================");
        for (int i = 0; i < list.size() ; i++) {
            System.out.print(list.get(i)+" ");
        }
        System.out.println();
        for (Integer y:list) {
            System.out.print(y+" ");
        }

        System.out.println();
        Iterator iterator1=list.listIterator(3);
while (iterator1.hasNext()){
    System.out.print(iterator1.next()+" ");
}


    }
}
